package com.design.pattern.state.service.impl;

import com.design.pattern.state.UserRoomContext;
import com.design.pattern.state.domain.ChatRoom;
import com.design.pattern.state.domain.User;
import com.design.pattern.state.service.State;

public class InsertPasswordState implements State {
    @Override
    public void handler(ChatRoom room, User user, UserRoomContext context) {
        System.out.println(user.getName()+"访问了密码为:"+room.getPassword()+"的房间"+room.getName());
    }
}
